package com.study.example.gameserver.module.player.domain;

import com.sparrow.cache.entity.AbstractEntity;
import com.study.example.gameserver.module.backpack.entity.PlayerBackPack;
import com.study.example.gameserver.module.currency.entity.PlayerCurrency;

/**
 * 玩家数据类型
 */
public enum PlayerDataType {
    /**
     * 背包模块
     */
    BackPack(1, PlayerBackPack.class),
    /**
     * 货币
     */
    Currency(2, PlayerCurrency.class),
    ;
    /**
     * 序号从1开始
     */
    private final int order;
    private final Class<? extends AbstractEntity> dataClass;

    PlayerDataType(int type, Class<? extends AbstractEntity> dataClass) {
        this.order = type;
        this.dataClass = dataClass;
    }

    public int getOrder() {
        return order;
    }

    public Class<? extends AbstractEntity> getDataClass() {
        return dataClass;
    }
}
